In a typical network computing environment, a computing device may communicate with one or more external devices via one or more communication networks. For example, a client device may communicate with a server via a wired or wireless network. In some cases, the network may comprise the Internet and the external devices may comprise web servers.
When communicating with an external server, a client device may send a data request to the server and receive data that is responsive to the request. In many cases, the client device may execute an application or script that sends the request. For example, an Extensible Markup Language Hypertext Transfer Protocol Requests (XMLHttpRequest) is a request object that can be used inside a web browser scripting language, such as JavaScript, to send an HTTP (Hypertext Transfer Protocol) or HTTPS (Hypertext Transfer Protocol Secure) request to a web server, and to then load the server response data back into the script for use. The response data may be usable within the script as both an XML document and as plain text.
Typically, when sending a request to a server, the client device may set a timer having a timeout value to determine whether response data is received from the server prior expiration of the timer. If the timer times out, the client device may assume that the request to the server has failed, and may attempt to re-send the request. JavaScript libraries often utilize a constant timeout value for such a timer in order to detect failed requests.